<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	//자바 스크립트 객체 - 속성들의 모음.
	var mycar = {color:"핑크", 
				brand:"아우디", 
				cc:4000, 
				go:function(){
					alert("go");//메소드
					}
	}//중괄호가 객체

function testObject(){
	var txt = "색 : " +mycar.color + "브랜드 : " + mycar.brand + "cc : " + mycar.cc;
	document.getElementById("layer").innerHTML = txt;
	
	mycar.go();
	}
</script>
</head>
<body>
<div id="layer"></div>
<button onclick="testObject()">내차정보</button>

</body>
</html>